//
//  ChooseServerTypeCollectionViewCell.m
//  PYWGetColor
//
//  Created by 杜文杰 on 2018/6/13.
//  Copyright © 2018年 dwj. All rights reserved.
//

#import "ChooseServerTypeCollectionViewCell.h"
@interface ChooseServerTypeCollectionViewCell()
@property(nonatomic, strong) UILabel *titleLabel;
@end

@implementation ChooseServerTypeCollectionViewCell
- (void)setDataDic:(NSDictionary *)dataDic
{
    self.titleLabel.text = dataDic[@"catname"];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setUpViews];
    }
    return self;
}

- (void)setUpViews
{
    [self addSubview:self.titleLabel];
    __weak typeof(self)weakself = self;
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(weakself.mas_centerY);
        make.centerX.equalTo(weakself.mas_centerX);
        make.left.equalTo(weakself);
        make.right.equalTo(weakself);
        make.height.mas_equalTo(40 / HEIGHT_6S_SCALE);
    }];
}
#pragma mark - init
- (UILabel *)titleLabel
{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.backgroundColor = getColor(@"F3F4F7");
        _titleLabel.font = DEF_FontSize_14;
        _titleLabel.textColor = getColor(blackColor);
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.text = @"冰箱清洗";
    }
    return _titleLabel;
}
@end

